import allure
import pytest
import requests
import conftest

class Test_logout():

    def setup_method(self):
        #定义登录接口URL地址
        self.login_url = "http://192.168.3.182:9990/airservice-sso/sso/logout"
    @pytest.mark.skip(reason="退出登录接口暂时跳过")
    @allure.step(title="账号名称wsf--退出登录")
    @pytest.mark.last
    def test_logout_case(self):
        response = requests.post(url=self.login_url, headers=conftest.headers_data)
        print(response.json())

        #添加断言
        assert response.json().get("message") == "操作成功"
        assert  response.json().get("success") == True